package com.example.interesting.distributed.log.realize.config;

import com.example.interesting.distributed.log.realize.BasicServletFilter;
import com.example.interesting.distributed.log.realize.dubbo.DubboEnvironmentPostProcessor;
import com.example.interesting.distributed.log.realize.feign.LogFeignInterceptor;
import com.example.interesting.distributed.log.realize.resttemplate.LogRestTemplatePostProcessor;
import com.example.interesting.distributed.log.realize.util.LogTraceInit;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 日志链路配置
 * @Author: fyw
 * @Date: 2024/4/4 15:35
 * @History
 */
@Configuration(proxyBeanMethods = false)
public class LogConfiguration {


    @Bean
    public LogTraceInit logTraceInit() {
        return new LogTraceInit();
    }

    @Bean
    public BasicServletFilter basicServletFilter() {
        return new BasicServletFilter();
    }

    @Bean
    public LogFeignInterceptor feignHeaderInterceptor() {
        return new LogFeignInterceptor();
    }

    @Bean
    public LogRestTemplatePostProcessor logRestTemplatePost() {
        return new LogRestTemplatePostProcessor();
    }

    @Bean
    public DubboEnvironmentPostProcessor dubboEnvironmentPostProcessor(){
        return new DubboEnvironmentPostProcessor();
    }

}
